package cn.fengwoo.springBoot.repository;


import cn.fengwoo.springBoot.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * 用户dao
 * DAO 集成 JpaRepository<PO,主键类型>
 * Created by fangdaji on 2018/1/10.
 */
public interface UserRepository extends JpaRepository<User,Integer>,PagingAndSortingRepository<User,Integer> {

    /**
     * 根据用户名查询
     * @param name
     * @return
     */
    List<User> findByName(String name);


}
